package com.example.jpatest.dao;

import com.example.jpatest.entity.Student;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;

public interface StudentDao extends JpaRepository<Student,Integer> {
    /**
     * 根据姓名模糊查询
     * @param name
     * @return
     */
    public List<Student> findByNameLike(String name);

    /**
     * 根据姓名和密码查询
     * @param name
     * @param password
     * @return
     */
    public List<Student> findByNameAndPassword(String name,String password);
}
